package com.ruoyi.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.yaml.snakeyaml.constructor.BaseConstructor;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sms.SendSms;
import com.ruoyi.system.domain.SysOperLog;

import io.jsonwebtoken.lang.Assert;

@RestController
@RequestMapping("/api/common")
public class CommonAppController extends BaseController {
	@Autowired
	private SendSms sms;
	@GetMapping("/sendSms")
	public Object login(@RequestParam String mobile,@RequestParam String code) {
		Assert.isTrue(StringUtils.isNotBlank(mobile),"手机号必填");
		String sendSms = sms.sendSms(mobile, "86", "zh", null);
		System.out.println(sendSms);
		return sendSms;
	}
}
